<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class Ripcord_Client</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class Ripcord_Client</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
							<a href="#sec-descendents">Descendents</a>
			|											<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This class implements a simple RPC client, for XML-RPC, (simplified) SOAP 1.1 or Simple RPC. The client abstracts  the entire RPC process behind native PHP methods. Any method defined by the rpc server can be called as if it was  a native method of the rpc client.</p>
<p class="description"><p>E.g.   <div class="src-code"><ol><li><div class="src-line">&nbsp;&nbsp;<span class="src-php">&lt;?php</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$client&nbsp;</span>=&nbsp;<span class="src-id"><a href="../Ripcord/ripcord.html">ripcord</a></span><span class="src-sym">::</span><a href="../Ripcord/ripcord.html#methodclient">client</a><span class="src-sym">(&nbsp;</span><span class="src-str">'http://www.moviemeter.nl/ws'&nbsp;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$score&nbsp;</span>=&nbsp;<span class="src-var">$client</span><span class="src-sym">-&gt;</span><span class="src-id">film</span><span class="src-sym">-&gt;</span><span class="src-id">getScore</span><span class="src-sym">(&nbsp;</span><span class="src-str">'e3dee9d19a8c3af7c92f9067d2945b59'</span><span class="src-sym">,&nbsp;</span><span class="src-num">500&nbsp;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;<span class="src-php">?&gt;</span></div></li>
</ol></div></p><p>The client has a simple interface for the system.multiCall method:  <div class="src-code"><ol><li><div class="src-line">&nbsp;<span class="src-php">&lt;?php</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;<span class="src-var">$client&nbsp;</span>=&nbsp;<span class="src-id"><a href="../Ripcord/ripcord.html">ripcord</a></span><span class="src-sym">::</span><a href="../Ripcord/ripcord.html#methodclient">client</a><span class="src-sym">(&nbsp;</span><span class="src-str">'http://ripcord.muze.nl/ripcord.php'&nbsp;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;<span class="src-var">$client</span><span class="src-sym">-&gt;</span><a href="http://www.php.net/system">system</a><span class="src-sym">-&gt;</span><span class="src-id">multiCall</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">start</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;<span class="src-id"><a href="../Ripcord/ripcord.html">ripcord</a></span><span class="src-sym">::</span><a href="../Ripcord/ripcord.html#methodbind">bind</a><span class="src-sym">(&nbsp;</span><span class="src-var">$methods</span><span class="src-sym">,&nbsp;</span><span class="src-var">$client</span><span class="src-sym">-&gt;</span><a href="http://www.php.net/system">system</a><span class="src-sym">-&gt;</span><span class="src-id">listMethods</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;<span class="src-id"><a href="../Ripcord/ripcord.html">ripcord</a></span><span class="src-sym">::</span><a href="../Ripcord/ripcord.html#methodbind">bind</a><span class="src-sym">(&nbsp;</span><span class="src-var">$foo</span><span class="src-sym">,&nbsp;</span><span class="src-var">$client</span><span class="src-sym">-&gt;</span><span class="src-id">getFoo</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;<span class="src-var">$client</span><span class="src-sym">-&gt;</span><a href="http://www.php.net/system">system</a><span class="src-sym">-&gt;</span><span class="src-id">multiCall</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">execute</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-php">?&gt;</span></div></li>
</ol></div></p><p>The soap client can only handle the basic php types and doesn't understand xml namespaces. Use PHP's SoapClient  for complex soap calls. This client cannot parse wsdl.  If you want to skip the ripcord::client factory method, you _must_ provide a transport object explicitly.</p></p>
	<ul class="tags">
				<li><span class="field">link:</span> <a href="http://wiki.moviemeter.nl/index.php/API">Moviemeter API documentation</a></li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_ripcord_client.php.html">/ripcord_client.php</a> (line <span class="field">47</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>

	<a name="sec-descendents"></a>
	<div class="info-box">
		<div class="info-box-title">Direct descendents</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
			<span class="disabled">Descendents</span>
			|												<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
								|															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<table cellpadding="2" cellspacing="0" class="class-table">
				<tr>
					<th class="class-table-header">Class</th>
					<th class="class-table-header">Description</th>
				</tr>
								<tr>
					<td style="padding-right: 2em"><a href="../Ripcord/Ripcord_Client_MultiCall.html">Ripcord_Client_MultiCall</a></td>
					<td>
											This class provides the fetch interface for system.multiCall. It is returned
										</td>
				</tr>
							</table>
		</div>
	</div>


	<a name="sec-var-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Variable Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendents</a> |
						<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
							| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<div class="var-summary">
																																																																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$_autoDecode" title="details" class="var-name">$_autoDecode</a>
				</div>
																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$_multiCall" title="details" class="var-name">$_multiCall</a>
				</div>
																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$_multiCallArgs" title="details" class="var-name">$_multiCallArgs</a>
				</div>
																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$_request" title="details" class="var-name">$_request</a>
				</div>
																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$_response" title="details" class="var-name">$_response</a>
				</div>
																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$_throwExceptions" title="details" class="var-name">$_throwExceptions</a>
				</div>
											</div>
		</div>
	</div>

	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendents</a> |
																		<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
						<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																												
												<div class="method-definition">
											<span class="method-result">Ripcord_Client</span>
										<a href="#__construct" title="details" class="method-name">__construct</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$url</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$options</span> = <span class="var-default">null</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$transport</span> = <span class="var-default">null</span>], [<span class="var-type">object</span>&nbsp;<span class="var-name">$rootClient</span> = <span class="var-default">null</span>])
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#__call" title="details" class="method-name">__call</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$name</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$args</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">object A</span>
										<a href="#__get" title="details" class="method-name">__get</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>)
									</div>
								</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendents</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<a name="var$_autoDecode" id="$_autoDecode"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$_autoDecode</span>
			 = <span class="var-default"> true</span>			(line <span class="line-number">117</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Whether or not to decode the XML-RPC datetime and base64 types to unix timestamp and binary string  respectively.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

</div>
<a name="var$_multiCall" id="$_multiCall"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$_multiCall</span>
			 = <span class="var-default"> false</span>			(line <span class="line-number">91</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">A flag to indicate if we are in a multiCall block. Start this with $client-&gt;system-&gt;multiCall()-&gt;start()</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$_multiCallArgs" id="$_multiCallArgs"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$_multiCallArgs</span>
			 = <span class="var-default">array()</span>			(line <span class="line-number">96</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">A list of deferred encoded calls.</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$_request" id="$_request"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$_request</span>
			 = <span class="var-default"> ''</span>			(line <span class="line-number">106</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The exact request from the client. For debugging purposes.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

</div>
<a name="var$_response" id="$_response"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$_response</span>
			 = <span class="var-default"> ''</span>			(line <span class="line-number">101</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The exact response from the rpc server. For debugging purposes.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

</div>
<a name="var$_throwExceptions" id="$_throwExceptions"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$_throwExceptions</span>
			 = <span class="var-default"> false</span>			(line <span class="line-number">111</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Whether or not to throw exceptions when an xml-rpc fault is returned by the server. Default is false.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

</div>
						
		</div>
	</div>
	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendents</a> |
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
																	<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>

<a name="method__construct" id="__construct"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">Constructor __construct</span> (line <span class="line-number">126</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The constructor for the RPC client.</p>
	<ul class="tags">
				<li><span class="field">throws:</span> Ripcord_ConfigurationException (ripcord::xmlrpcNotInstalled) when the xmlrpc extension is not available.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">Ripcord_Client</span>
		<span class="method-name">
			__construct
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$url</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$options</span> = <span class="var-default">null</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$transport</span> = <span class="var-default">null</span>], [<span class="var-type">object</span>&nbsp;<span class="var-name">$rootClient</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$url</span><span class="var-description">: The url of the rpc server</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$options</span><span class="var-description">: Optional. A list of outputOptions. See <a href="../Ripcord/Ripcord_Server.html#methodsetOutputOption">Ripcord_Server::setOutputOption()</a></span>			</li>
					<li>
				<span class="var-type">object</span>
				<span class="var-name">$rootClient</span><span class="var-description">: Optional. Used internally when using namespaces.</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$transport</span>			</li>
				</ul>
		
			
			<hr class="separator" />
		<div class="notes">Redefined in descendants as:</div>
		<ul class="redefinitions">
					<li>
				<a href="../Ripcord/Ripcord_Client_MultiCall.html#method__construct">Ripcord_Client_MultiCall::__construct()</a>
							</li>
				</ul>
	</div>
<a name="method__call" id="__call"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">__call</span> (line <span class="line-number">165</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This method catches any native method called on the client and calls it on the rpc server instead. It automatically  parses the resulting xml and returns native php type results.</p>
	<ul class="tags">
				<li><span class="field">throws:</span> Ripcord_RemoteException when _throwExceptions is true and the server returns an XML-RPC Fault.</li>
				<li><span class="field">throws:</span> Ripcord_InvalidArgumentException (ripcord::notRipcordCall) when handling a multiCall and the  arguments passed do not have the correct method call information</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			__call
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$name</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$args</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$name</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$args</span>			</li>
				</ul>
		
			
	</div>
<a name="method__get" id="__get"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">__get</span> (line <span class="line-number">283</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This method catches any reference to properties of the client and uses them as a namespace. The  property is automatically created as a new instance of the rpc client, with the name of the property  as a namespace.</p>
	<ul class="tags">
				<li><span class="field">return:</span> Ripcord Client with the given namespace set.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">object A</span>
		<span class="method-name">
			__get
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$name</span><span class="var-description">: The name of the namespace</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Tue, 16 Nov 2010 16:20:17 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
	</p>
	</div></body>
</html>